#include "lgDoorDet.h"



void lgInitDoorDetect()
{
   GPIO_PinInit(DOOR_DET_PIN, GPIO_PinInput);
}


DOOR_TYPE_T   sys_door_type()
{
     DOOR_TYPE_T  doorType = DOOR_UNKNOW;
    
    unsigned  char  nRes = 0;
    

       nRes = DOOR_DET_IN;
       if(nRes > 0)
       {
          doorType = DOOR_OPEN  ;
       }
       else
       {
          doorType = DOOR_CLOSE;
       }
    
    return    doorType; 
}